import service from '../../service/api'
export function getDeptList(params) {
  return service({
    url: '/system/dept/list',
    method: 'get',
    params
  })
}

export function addDept(data) {
  return service({
    url: '/system/dept',
    method: 'post',
    data
  })
}

export function updateDept(data) {
  return service({
    url: '/system/dept',
    method: 'put',
    data
  })
}

export function delDept(id) {
  return service({
    url: '/system/dept/' + id,
    method: 'delete'
  })
}

export function listDeptExcludeChild(id) {
  return service({
    url: '/system/dept/list/exclude/' + id,
    method: 'get'
  })
}

export function getDept(id) {
  return service({
    url: '/system/dept/' + id,
    method: 'get'
  })
}